-
-
Notifications
You must be signed in to change notification settings - Fork 42
London | SDC-Nov-2025| Ikenna Agulobi | Sprint 5| Prep exercise python #312
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
…t it does report and error
This comment has been minimized.
This comment has been minimized.
LonMcGregor
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very good work on these tasks, there are some areas where you could improve further
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Has this file passed the mypy type checker?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you describe the difference and any dis/advantage of using a class method vs a function?
| def print_family_tree(person: Person) -> None: | ||
| print(person.name) | ||
| for child in person.children: | ||
| print(f"- {child.name} ({child.age})") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can this print grandchildren recursively?
| if best_os != person.preferred_operating_system and best_count > preferred_count: | ||
| print( | ||
| f"If you are willing to accept {best_os.value} instead," | ||
| f"You're more likely to get a laptop. {best_count} available)." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you have an extra bracket here you dont need
Learners, PR Template
Self checklist
Changelist
This PR contains my sprint 5 prep exercises: